<%@ page import="com.seeyoui.kensite.common.constants.StringConstant"%>
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%  PropertyResourceBundle prb = (PropertyResourceBundle) PropertyResourceBundle.getBundle("file-management");
	String fileDir = prb.getString("file.upload.url");
	request.setAttribute("fileDir", fileDir);
 %>
<%@ include file="/WEB-INF/view/taglib/common.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>    
    <title>用户信息</title>
	<%@ include file="/WEB-INF/view/taglib/header.jsp" %>
	<%@ include file="/WEB-INF/view/taglib/easyui.jsp" %>
	<%@ include file="/WEB-INF/view/taglib/layer.jsp" %>
  </head>
  <body>
  	<div style="position:absolute;top:0px;left:0px;right:0px;bottom:0px;">
	    <div id="container" style="position:absolute;top:0px;width:300px;right:0px;bottom:0px;">
	    </div>
    </div>
    <script>
        window.onload = function listFiles(){
        	$.ajax({
				type: "post",
				url: "${ctx}/file/list/files",
				data: {},
				dataType: 'json',
				success: function(data){
					for(var i=0;i<data.length;i++){
						(function(){
							var indexData = data[i];
							var aEle=$("<a></a>").text(indexData.fileName).attr("href","${ctx}/sysUser/openFile?fileName="+indexData.fileName).attr("target","_blank");   // 以 jQuery创建新元素
							var brEle=$("<br>");
							$("#container").append(aEle);         // 追加新元素
							$("#container").append(brEle);         // 追加新元素
						})();
					}
				}
			});
        }
    </script>
  </body>
</html>
